//
//  PKRadioMainDetailTableViewCell.m
//  PianKe
//
//  Created by mingtao on 15/10/4.
//  Copyright (c) 2015年 mingtao. All rights reserved.
//

#import "PKRadioMainDetailTableViewCell.h"

#import <UIImageView+WebCache.h>

@implementation PKRadioMainDetailTableViewCell


-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        _imagecoverimg = [[UIImageView alloc]init];
        
        _imagecoverimg.frame =CGRectMake(0, 0, WIHES, HHIHEI/4);
        
        [self addSubview:_imagecoverimg];
        
        
        
        _imageicon = [[UIImageView alloc]init];
        
//        _imageicon.frame = CGRectMake(5, HHIHEI/4-5, WIHES/3-40, 100);
//        
//        [self.contentView addSubview:_imageicon];
//        
        _imageicon = [[UIImageView alloc]initWithFrame:CGRectMake(10, HHIHEI/4+15, WIHES/10, 30)];
        //setCornerRadius
        [_imageicon.layer setCornerRadius:25];
        
       // _lablemusicvisitnum.text =@"片刻";
        //
        [self addSubview:_imageicon];
        
        _labletitle = [[UILabel alloc]initWithFrame:CGRectMake(10, HHIHEI/4+45, WIHES/3, 30)];
        
        _labletitle.text = @"片刻每日推荐";
        
        [self addSubview:_labletitle];
        
    }
    return self;

}

-(void)setArray:(NSMutableArray *)array
{
    PKRadioMainModelDetail *Detail=array[0];
    
    [_imagecoverimg sd_setImageWithURL:[NSURL URLWithString:[array[0] coverimg]]];
    
    [_imageicon sd_setImageWithURL:[NSURL URLWithString:Detail.userinfo[@"icon"]]];

}
//RadioDetail
//-(void)setRadioDetail:(PKRadioMainModelDetail *)RadioDetail
//{
//    _RadioDetail = RadioDetail;
//    
//    [_imagecoverimg sd_setImageWithURL:[NSURL URLWithString:RadioDetail.coverimg]];
//    
//    
////    [_imageicon sd_setImageWithURL:[NSURL URLWithString:RadioDetail.coverimg]];
////    
////    //给数字类型转换string类型进行赋值
////    _lablemusicvisitnum.text = [NSString stringWithFormat:@"%ld",RadioDetail.musicvisitnum];
////    
////    _labletitle.text = RadioDetail.title;
////    
//
//}




@end
